<template>
    <div class="file">
        <div class="heade">
            <img class="back" src="../../assets/Fill 1@2.88x.png" alt="" @click="backs">
            {{navtitle}}
        </div>
        <div class="content">
            <van-tabs>
                <van-tab title="基本信息">
                    <div class="cont1">
                        <div class="con">
                            <p class="shang">{{goods.custName}}</p>
                            <div class="con-list">
                                <div class="list">收藏人数：<span class="ren"></span></div>
                                <div class="list">渠道类型：<span class="ren">{{goods.businessType}}</span></div>
                                <div class="list">经营品牌：<span class="ren">{{goods.channelTypeDesc}}</span></div>
                                <div class="list">经营品牌：<span class="ren">{{goods.brandsType}}</span></div>
                            </div>
                        </div>
                        <div class="hao">
                            <div class="lian">
                                <div class="zhi">联系人：<p class="xi">{{goods.contactsName}}</p></div>
                                <div class="zhi">所在地址：<p class="xi"></p></div>
                            </div>
                            <div class="ma">
                                <img class="shou" src="../../assets/image/ic_phone_gray.png" alt="">
                                联系电话
                            </div>
                        </div>
                    </div>
                </van-tab>
                <van-tab title="工商信息">
                    <div class="cont2">
                        <div class="con">
                            <p class="shang">企业资格：<span class="zige">资质已认证</span></p>
                            <div class="con-list">
                                <div class="list">注册号：<span class="ren">{{goodses.regCode}}</span></div>
                                <div class="list">成立时间：<span class="ren">2012-5-2 0:00:00</span></div>
                                <div class="list">注册资本：<span class="ren">{{goodses.regCapital}}</span></div>
                                <div class="list">注册地址：<span class="ren">{{goodses.regAddress}}</span></div>
                                <div class="list">经营范围：<span class="ren">{{goodses.scope}}</span></div>
                                <div class="list">企业类型：<span class="ren">{{goodses.companyType}}</span></div>
                                <div class="list">邮箱：<span class="ren"></span></div>
                            </div>
                        </div>
                        <div class="hao">
                            <div class="ma">
                                <img class="shou" src="../../assets/image/ic_phone_gray.png" alt="">
                                联系电话
                            </div>
                        </div>
                    </div>
                </van-tab>
            </van-tabs>
        </div>
    </div>
</template>

<script>
import { Tab, Tabs } from 'vant';
import Vue from 'vue'
Vue.use(Tab).use(Tabs);
import axios from 'axios'
export default {
    name:'file',
    data(){
        return{
            navtitle:'成都康莱商贸有限公司',
            cur:0,
            list:[
                {title:'',time:'13.5万人'},
                {title:'',time:'品牌商'},
                {title:'',time:'拉菲、迪奥、香奈儿、蒙牛'},
                {title:'联系人：',time:'张三'},
                {title:'所属地区：',time:'北京市朝阳区'},
            ],
            goods:[],
            goodses:''
        }
    },
    methods:{
        backs(){
            this.$router.back(-1)
        },
        tab(index){
            this.cur=index
        },
        getAxios(){
            let headers;
            if(this.$store.state.token){
                headers={
                    token: this.$store.state.token,
                    userId: this.$store.state.userInfo.id
                }
            }else{
                headers={

                }
            }
            let userId=this.$store.state.userInfo.id
            this.$http.get('https://web-gateway.newbeescm.com/b2b-app-web/getDealerFileInfoById/16298/'+userId,{
                headers,
                // params:{
                //     token: this.$store.state.token,
                //     userId: this.$store.state.userInfo.id
                // }
            }).then(res=>{
                console.log(res)
                if(res.data.status.statusCode === 0){
                    this.goods = res.data.result;
                    this.goodses = res.data.result.businessInfo;
                    console.log(this.goods)
                    console.log(this.goodses)
                }
            }).catch(err=>{
                console.log(err)
            })
        }
    },
    created(){
        this.$nextTick(()=>{
            this.getAxios()
        })
    }
}
</script>

<style lang="scss" scoped>
.file{
    width: 100%;
    .heade{
        height: 0.435rem;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        color: #030303;
        font-size: 0.18rem;
        .back{
            position: absolute;
            left:0.14rem;
            bottom: 0.1rem; 
            width: 0.1rem;
            height: 0.18rem;
        }
        &::after{
            content: "";
            position: absolute;
            width: 100%;
            left: 0;
            bottom: 0;
            background: #ccc;
            height: 1px;
            transform:scale(1,0.5) 
        }
    }
    .content{
        width: 100%;
        .tit{
            color: #DD3333;
        }
        .title{
            color: #333;
        }
        .cont1{
            width: 100%;
            .con{
                width: 100%;
                padding: 0.2rem 0.14rem;
                box-sizing: border-box;
                .shang{
                    font-size: 0.16rem;
                    color: #333;
                    .zige{
                        font-size: 0.12rem;
                        color: #fff;
                        background: #ccc;
                        border-radius: 0.02rem;
                        padding: 0.02rem;
                        
                    }
                }
                .con-list{
                    margin-top: 0.2rem;
                    width: 100%;
                    .list{
                        font-size: 0.14rem;
                        color: #797979;
                        margin-top: 0.15rem;
                        .ren{
                            color: #000;
                        }
                    }
                }
            }
            .hao{
                width: 100%;
                height: 2.85rem;
                background: #ddd;
                padding-top: 0.1rem;
                .lian{
                    width: 100%;
                    background: #fff;        
                    margin:0;
                    padding:0.05rem 0.14rem;
                    box-sizing:border-box;
                    .zhi{
                        width: 100%;
                        height: 0.3rem;
                        font-size: 0.12rem;
                        color: #000;
                        display: flex;
                        justify-content: flex-start;
                        align-items: center;
                        .xi{
                            font-size: 0.1rem,
                        }
                    }
                }
                .ma{
                    width: 100%;
                    height: 0.4rem;
                    font-size: 0.16rem;
                    color: #333;
                    margin-top: 0.1rem;
                    background: #fff;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    .shou{
                        width: 0.16rem;
                        height: 0.16rem;
                        margin-right: 0.1rem;
                    }
                }
            }
        }
        .cont2{
            width: 100%;
            .con{
                width: 100%;
                padding: 0.2rem 0.14rem;
                box-sizing: border-box;
                .shang{
                    font-size: 0.16rem;
                    color: #333;
                    .zige{
                        font-size: 0.12rem;
                        color: #fff;
                        background: #ccc;
                        border-radius: 0.02rem;
                        padding: 0.02rem;
                        
                    }
                }
                .con-list{
                    margin-top: 0.13rem;
                    width: 100%;
                    .list{
                        font-size: 0.14rem;
                        color: #797979;
                        margin-top: 0.11rem;
                        .ren{
                            color: #000;
                        }
                    }
                }
            }
            .hao{
                width: 100%;
                height: 2.85rem;
                background: #ddd;
                padding-top: 0.1rem;
                .ma{
                    width: 100%;
                    height: 0.4rem;
                    font-size: 0.16rem;
                    color: #333;
                    margin-top: 0.1rem;
                    background: #fff;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    .shou{
                        width: 0.16rem;
                        height: 0.16rem;
                        margin-right: 0.1rem;
                    }
                }
            }
        }
    }
}
</style>

